window.onload = function (){
    // 简单的交互效果
    document.addEventListener('DOMContentLoaded', function() {
        // 卡片悬停效果增强
        const cards = document.querySelectorAll('.article-card');
        cards.forEach(card => {
            card.addEventListener('mouseenter', function() {
                this.style.transform = 'translateY(-8px)';
                this.style.boxShadow = '0 15px 30px rgba(0, 0, 0, 0.4)';
            });

            card.addEventListener('mouseleave', function() {
                this.style.transform = 'translateY(0)';
                this.style.boxShadow = '0 10px 25px rgba(0, 0, 0, 0.3)';
            });
        });

        // 搜索框聚焦效果
        const searchInput = document.querySelector('.search-bar input');
        searchInput.addEventListener('focus', function() {
            this.parentElement.style.transform = 'scale(1.02)';
        });

        searchInput.addEventListener('blur', function() {
            this.parentElement.style.transform = 'scale(1)';
        });

        // 当前年份更新
        document.querySelector('.copyright').innerHTML =
            `&copy; ${new Date().getFullYear()} TechSphere 技术博客. 保留所有权利.`;
    });
};